home *** CD-ROM | disk | FTP | other *** search
/ Developer CD Series 1992 June: ROMin Holiday / ADC Developer CD (1992-06) (''ROMin Holiday'')_iso / Developer Connection - 06-1992.iso / Development Platforms / Apple II / Essentials / Technical.Notes / Misc / TN.MISC.007 < prev    next >
Encoding:
Text File  |  1991-06-28  |  5.6 KB  |  110 lines  |  [TEXT/pdos]

  1. Apple II
  2. Technical Notes
  3. _____________________________________________________________________________
  4.                                                   Developer Technical Support
  5.  
  6.  
  7. Apple II Miscellaneous
  8. #7:          Apple II Family Identification
  9.  
  10. Revised by:  Jim Luther                                              May 1991
  11. Written by:  Cameron Birse and Matt Deatherage                  December 1986
  12.  
  13. This Technical Note describes the ROM identification bytes in the Apple II 
  14. family.
  15.  
  16. Changes since November 1988:  Added the identification bytes needed to 
  17. identify the Apple IIe Card for Macintosh LC.
  18. _____________________________________________________________________________
  19.  
  20. To identify which computer of the Apple II family is executing your program, 
  21. you must check the following identification bytes.  These bytes are in the 
  22. main bank of main ROM (shadowed on the Apple IIgs), and you should make sure 
  23. that this bank is switched in before making decisions based on the contents 
  24. of these locations.
  25.  
  26. Machine                    $FBB3    $FB1E    $FBC0    $FBDD    $FBBE    $FBBF
  27. -----------------------------------------------------------------------------
  28. Apple ][                    $38              [$60]                      [$2F]
  29. Apple ][+                   $EA      $AD     [$EA]                      [$EA]
  30. Apple /// (emulation)       $EA      $8A
  31. Apple IIe                   $06               $EA                       [$C1]
  32. Apple IIe (enhanced)        $06               $E0                       [$00]
  33. Apple IIe Option Card       $06               $E0      $02      $00
  34. Apple IIc                   $06               $00                        $FF
  35. Apple IIc (3.5 ROM)         $06               $00                        $00
  36. Apple IIc (Org. Mem. Exp.)  $06               $00                        $03
  37. Apple IIc (Rev. Mem. Exp.)  $06               $00                        $04 
  38. Apple IIc Plus              $06               $00                        $05
  39. Apple IIgs                  (see below)
  40.  
  41. Note:    Values listed in square brackets in the table are provided for your 
  42.          reference only.  You do not need to check them to conclusively 
  43.          identify an Apple II.
  44.  
  45. The Apple IIe Card for Macintosh LC uses the same identification bytes ($FBB3 
  46. and $FBC0) as an enhanced Apple IIe.  Location $FBDD allows you to tell the 
  47. difference between the Apple IIe Card and an enhanced Apple IIe because $FBDD 
  48. will always contain the value $02 on the Apple IIe Card.  Location $FBBE is 
  49. the version byte for the Apple IIe Card (just as $FBBF is the version byte 
  50. for the Apple IIc family) and is $00 for the first release of the Apple IIe 
  51. Card.
  52.  
  53.  
  54. The ID bytes for an Apple IIgs are not listed in the table since they match 
  55. those of an enhanced Apple IIe.  Future 16-bit Apple II products may match 
  56. different Apple II identification bytes for compatibility reasons, so to 
  57. identify a machine as a IIgs or other 16-bit Apple II, you must make the 
  58. following ROM call:
  59.  
  60.     SEC        ;Set carry bit (flag)
  61.     JSR $FE1F    ;Call to the monitor
  62.     BCS OLDMACHINE    ;If carry is still set, then old machine
  63.     BCC NEWMACHINE    ;If carry is clear, then new machine
  64.  
  65. In all the current, standard Apple II ROMs, $FE1F contains an RTS.  In the 
  66. Apple IIgs, there is a routine that returns compatibility information in the 
  67. A, X, and Y registers:
  68.  
  69. Bit       Accumulator  X Register  Y Register
  70. ------------------------------------------------------------------------
  71. Bit 15   Reserved                          Reserved    Machine ID Number 
  72.                                                        (0 = Apple IIgs)
  73. Bit 14   Reserved                          Reserved    Machine ID Number
  74. Bit 13   Reserved                          Reserved    Machine ID Number
  75. Bit 12   Reserved                          Reserved    Machine ID Number 
  76. Bit 11   Reserved                          Reserved    Machine ID Number
  77. Bit 10   Reserved                          Reserved    Machine ID Number
  78. Bit 9    Reserved                          Reserved    Machine ID Number
  79. Bit 8    Reserved                          Reserved    Machine ID Number
  80. Bit 7    Reserved                          Reserved    ROM version number
  81. Bit 6    1 if system has memory expansion slot
  82.                                            Reserved    ROM version number
  83. Bit 5    1 if system has IWM port          Reserved    ROM version number
  84. Bit 4    1 if system has a built-in clock  Reserved    ROM version number
  85. Bit 3    1 if system has desktop bus       Reserved    ROM version number
  86. Bit 2    1 if system has SCC built-in      Reserved    ROM version number
  87. Bit 1    1 if system has external slots    Reserved    ROM version number
  88. Bit 0    1 if system has internal ports    Reserved    ROM version number
  89.  
  90.                                                                                                                                 Note:    In emulation or eight-bit mode, only the lower eight bits are   
  91.          returned.
  92.  
  93. This ROM call is enough to determine if a machine is an Apple IIgs or 
  94. equivalent.
  95.  
  96. Note:    The original Apple IIgs ROM returns a faulty value in the 
  97.          accumulator.  The value returned is $xx1F and should be $xx7F.  If 
  98.          you see a $0000 in the Y register (i.e., Apple IIgs, ROM version 
  99.          $00), you should assume that the accumulator value is $xx7F.
  100.  
  101. The current Apple IIgs ROM (ROM version $01) sets all the registers correctly 
  102. before returning from this call.
  103.  
  104.  
  105. Further Reference
  106. ____________________________________________________________________________
  107.  
  108. o    Apple II Miscellaneous Technical Note #2, Apple II Family Identification 
  109.      Routines 2.2
  110.